<template>
  <div class="deliver-info">
    <div class="deliver-service-header border-bottom">
      <div class="back-icon" @click="goBack">
        <i class="el-icon-arrow-left">返回</i>
      </div>
      <div class="deliver-service-title">
        <p>详细信息</p>
      </div>
      <div class="deliver-stuff">
      </div>
    </div>
    <div class="deliver-service-content">
      <div class="content-item">
        <div class="item-box border" v-for="item of delieverItem" :key="item.id">
          <div class="item-title border-bottom">
            <span class="left-box">服务类型</span>
            <span class="right-box">快递代领</span>
          </div>
          <div class="item-info">
            <div class="info-box border-bottom">
              <span class="left-item">发布人</span>
              <span class="right-item">{{ item.user_id }}</span>
            </div>
            <div class="info-box border-bottom">
              <span class="left-item">联系方式</span>
              <span class="right-item">{{ item.phone }}</span>
            </div>
            <div class="info-box border-bottom">
              <span class="left-item">快递公司</span>
              <span class="right-item">{{ item.deliver_compony }}</span>
            </div>
            <div class="info-box border-bottom">
              <span class="left-item">物品类型</span>
              <span class="right-item">{{ item.remark }}</span>
            </div>
            <div class="info-box">
              <span class="left-item">宿舍楼号</span>
              <span class="right-item">{{ item.address }}</span>
            </div>
          </div>
          <div class="pick-item border-top" @click="visible=true">
            <span  slot="reference">我已经送达了</span>
          </div>
          <el-popover placement="top-start"
                      width="80%"
                      v-model="visible"
          >
            <div class="img">
              <img src="@/assets/styles/image/avatar/pay_code.png" alt="">
            </div>
            <div style="text-align: right; margin: 0">
              <el-button size="mini" type="text" @click="visible = false">取消</el-button>
              <el-button type="primary" size="mini" @click="visible = false">确定</el-button>
            </div>
          </el-popover>

        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "Deliver_info",
    data () {
      return {
        visible: false,
        delieverItem: [{
          id: '1',
          user_id: '狗剩先生',
          phone: '18577995107',
          deliver_compony: '顺丰快递',
          remark: '大件',
          address: '西区3栋 C605'
        }],
      }
    },
    methods: {
      goBack () {
        this.$router.push('/deliver_service')
      }
    }
  }
</script>

<style lang="stylus" scoped>
  /* header */
  .deliver-service-header
    width: 100%;
    height: 50px;
    background: #fff;
  .deliver-service-title,.back-icon
    float: left;
    color: #666;
    text-align: center;
  .back-icon
    width: 20%;
    line-height: 50px;
    z-index: 2;
    color: #1989fa;
    font-size: 16px;
  .deliver-service-title
    width: 60%;
    line-height: 50px;
    font-size: 18px;
  .deliver-service-title p
    margin: 0;
  .deliver-stuff
    width: 20%;
    float: left;
    text-align: center;
    line-height: 50px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
  /* 内容 */
  .deliver-service-content
    padding: 20px 15px
    .content-item
      padding: 0 5px
      .item-box
        margin-bottom: 20px;
      .item-box:before
        border-radius: 10px;
        box-shadow: 0 0 10px #e5e5e5;
      .item-title, .info-box
        padding: 10px;
        display: flex;
        line-height: 20px
      .info-box span, .item-box span
        flex: 1
      .item-title .left-box
        font-size: 14px;
        color: #3a3a3a;
        font-weight: 700;
      .item-title .right-box
        font-size: 14px;
        text-align: right;
        font-family: sans-serif;
        font-weight: 700;
        color: cadetblue;
      .item-title
        padding: 10px 20px
      .item-info
        padding: 0px 10px 5px 10px;
        .info-box .left-item
          color: #666;
          font-size: 14px;
          font-weight: 600;
        .info-box .right-item
          text-align: right;
          font-family: sans-serif;
          font-weight: 500;
          font-size: 14px;
      .pick-item
        padding: 10px;
        text-align: center;
        font-size: 14px;
        font-weight: 600;
        font-family: sans-serif;
        color: #fff;
        background: #2d97d6;
        border-bottom-left-radius: 5px
        border-bottom-right-radius: 5px
      .img img
        width: 100%;
  .item-box >>> .el-popover
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    overflow: hidden;

</style>
